import axios from '@/fetch'

export function addCompany(data) {
  return axios({
    url: "/agency/save",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    data: data
  })
}

export function delCompany(data) {
  return axios({
    url: "/agency/delete",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params: data
  })
}

export function upCompany(id, data) {
  return axios({
    url: "/agency/update",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params: id,
    data: data
  })
}
export function getCompanyid(id) {
  return axios({
    url: "/agency/findone",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params: id,
  })
}

export function getCompany(data) {
  return axios({
    url: "/agency/findall",
    method: "post",
    params:data
  })
}

export function cyqueryid(data) {
  return axios({
    url: "/agency/findbynumber",
    headers: {'Content-Type': 'application/json'},
    method: "post",
    params: data
  })
}
